home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / asm_n_z.zip / STROBE.AVA < prev    next >
Text File  |  1989-01-13  |  9KB  |  176 lines

  1.  
  2.  
  3.      April 28, 1987                               IBM INTERNAL USE ONLY
  4.  
  5.  
  6.      STROBE:  VIEW A MEMORY FIELD AND MONITOR IT FOR CHANGES
  7.  
  8.  
  9.  ||  January 13, 1989 - when removed, STROBE now releases the memory it
  10.  ||  has occupied.   Also fixed a potential BRS bug at timer routine exit.
  11.  
  12.   |  October 24, 1988 - once some technical details not covered in the
  13.   |  original AVAIL notice had been covered in STROBE FORUM, the forum
  14.   |  became inactive and was sent off to the TOOLS archives.  To keep
  15.   |  the archived information easily available, I have appended below
  16.   |  the forum entries of technical interest.  STROBE ASM and COM files
  17.   |  have not changed.  This AVAIL notice is the only part of the package
  18.   |  that has changed.   PQ 10/88
  19.  
  20.      STROBE is a resident debugging tool that spots changes to control
  21.      blocks or other memory fields as they occur.  STROBE hooks
  22.      hardware interrupt 8 and, each time the timer ticks, updates its
  23.      window display of a user-specified memory field.  If the field's
  24.      value differs from its value on the preceding tick, STROBE alerts
  25.      the user by switching the window to a different background color.
  26.  
  27.      To install:  STROBE  {options}
  28.                   options:   M  use monochrome display
  29.                              C  use color display
  30.                              S  synchronize to avoid CGA flicker
  31.  ||                          R  remove an active copy of STROBE
  32.  
  33.      I originally wrote STROBE to track down a mysterious change to the
  34.      timer-tick rate while multiple applications were running under
  35.      TopView.  The speed of the moving blob on the top line of the
  36.      STROBE window illustrates the timer-tick arrival rate nicely.
  37.      Also, if a copy of STROBE is started in each TopView partition,
  38.      the starts and stops of each timer-tick blob will demonstrate the
  39.      time slice allotted to each partition.  I guess this could be made
  40.      to work for other multitasking systems as well.
  41.  
  42.      The idea of monitoring a storage field for value changes and then
  43.      switching the window color came while trying to determine which
  44.      program in my machine was hooking interrupt 21 (the answer: just
  45.      about all of them).  For color displays, STROBE starts by
  46.      displaying the monitored field in white characters on a black
  47.      background, then cycles through background colors of red, green
  48.      and magenta as the field changes.  For a monochrome display, the
  49.      sequence is normal, reversed, high-intensity and underlined.
  50.  
  51.      As distributed, STROBE monitors changes to the interrupt 21 vector
  52.      as it is hooked by various programs.  For a demonstration, start
  53.      STROBE and then fire up TopView, FileCommand, the PC3270 Emulation
  54.      Program, or anything else that hooks interrupt 21.
  55.  
  56.      Writing a front end to define the field to be monitored and the
  57.      size and position of the window would be a major effort, so I am
  58.      providing the source code for modification.  Thanks to all the
  59.      tool owners who helped me learn PC Assembler by providing theirs.
  60.  
  61.      *   To redefine the window size and position, or the address of
  62.          the memory field you want to monitor, revise the data items on
  63.          page 2 of the assembly listing.
  64.  
  65.      *   If the field to be monitored is something other than a 4-byte
  66.          interrupt vector, you'll need to tweak the routines
  67.          Check_Major, Show_Major and Save_Major to allow for it.
  68.  
  69.      *   The routines labeled Show_Blob, Show_Count, and Show_Minor can
  70.          be deleted if the information provided by them is of no
  71.          interest.
  72.  
  73.      Remember that STROBE only checks for value changes at each timer
  74.      tick, normally 18.2 times per second.  As with the "disco
  75.      lightning" of the same name, you can't be absolutely sure what's
  76.      happening between the flashes.  If the memory field you are
  77.      watching is modified but restored to its original value between
  78.      timer ticks, STROBE won't know about it, and neither will you.
  79.  
  80.      I developed and tested STROBE on an 8MHz AT with both monochrome
  81.      and CGA displays.  I also ran it briefly on all the other PC and
  82.      PS/2 gear I could get my hands on, without apparent problems.
  83.      STROBE was tested under DOS 3.3 only, but I see no reason why it
  84.      wouldn't run under any DOS version from 2.1 up.
  85.  
  86.  ||  Once resident, STROBE requires about 1120 bytes of memory.  The
  87.  ||  'R' option removes the most-recently-loaded copy of STROBE by
  88.  ||  unhooking it from the timer interrupt chain and freeing its memory.
  89.  
  90.   |  <Removed reference to defunct STROBE FORUM>
  91.  
  92.  
  93.  
  94.      Paul Quale - QUALE at BCRVMPC1
  95.  
  96.  
  97.   |  ----- STROBE FORUM appended at 15:22:28 on 87/04/30 GMT
  98.   |  Subject: Data Displayed
  99.   |        I have downloaded the program and I am running it right now.
  100.   |  What is being displayed and in what format?  Thanks.
  101.   |
  102.   |  ----- STROBE FORUM appended at 22:58:49 on 87/04/30 GMT
  103.   |  Re: Data Displayed
  104.   |
  105.   |  Good question - I should have included that info in the AVAIL, so
  106.   |  the demo could be better understood.  Here it is, by line number:
  107.   |
  108.   |  1. The blob moving across the screen advances one position each time
  109.   |     the timer ticks, normally 18.2 times per second.  If it moves faster,
  110.   |     your timer has been speeded up by some program.  If it doesn't
  111.   |     move at all and you're in TopView, the partition that started this
  112.   |     copy of STROBE isn't getting any time.  If it's not moving and you're
  113.   |     *not* in TopView, see (5) below for the bad news.
  114.   |
  115.   |  2. A count (in hex) of timer tick/interrupt-8 entries to STROBE since
  116.   |     it was started up.  Probably of no interest to anyone but me.
  117.   |
  118.   |  3. The contents, in CS:IP format, of the interrupt 21 vector at location
  119.   |     0000:0084.  If this value changes, the color of STROBE's window will
  120.   |     change also.  The source code must be changed to monitor the field
  121.   |     of real interest to you.
  122.   |
  123.   |  4. The same as line 3, only for INT 2Fh instead of for INT 21h.  STROBE
  124.   |     doesn't do anything special if this value changes.  It's
  125.   |     included to show, in the source code, how a field of lesser interest
  126.   |     can also be displayed.
  127.   |
  128.   |  5. The address, in CS:IP format, of the instruction to which STROBE will
  129.   |     return control.  Normally this will be the program executing when the
  130.   |     timer goes off, and provides a hint at where your machine is spending
  131.   |     most of its time.  If your machine should ever hang, its final value
  132.   |     shows where you've been Recently, but not necessarily where you hung.
  133.   |
  134.   |  Probably none of the above are of even the most remote interest to you
  135.   |  in debugging the problem you have today.  To display your favorite field
  136.   |  you'll have to dig into the source.  Questions about "how" are welcome,
  137.   |  although a close look at the source will show I'm no Assembler expert!
  138.   |
  139.   |  Paul Quale - QUALE at BCRVMPC1
  140.   |
  141.   |  ----- STROBE FORUM appended at 12:06:17 on 87/05/01 GMT
  142.   |  Subject: Data Displayed Answer
  143.   |        Thanks for the info.  I put in my own values for the int. vectors
  144.   |  that I want to monitor.  I get multiple Phase Errors on assembly with
  145.   |  MASM 1.0.    What assembler are you using?
  146.   |
  147.   |  ----- STROBE FORUM appended at 15:40:39 on 87/05/04 GMT
  148.   |  Subject: Data Displayed Answer
  149.   |
  150.   |  I assembled it ok with MASM 2.0.
  151.   |
  152.   |  ----- STROBE FORUM appended at 07:53:57 on 87/05/20 GMT
  153.   |  Subject: Monitoring other memory locations
  154.   |
  155.   |  Patching the memory locations to be monitored on the fly can be very
  156.   |  handy for tracking down ill-behaved gremlins and following up clues.
  157.   |  It's handy to do this even on the copy resident in memory.  Much easier
  158.   |  than editing, reassembling, removing and reinstalling, and setting
  159.   |  up the whole test environment again.
  160.   |
  161.   |  Paul, I'm sending you a copy of the source I have modified, which has
  162.   |  the memory addresses to be monitored at a single, patchable locat